# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyLongrunningRequest do
  @moduledoc """
  A request message for AssetService.AnalyzeIamPolicyLongrunning.

  ## Attributes

  *   `analysisQuery` (*type:* `GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery.t`, *default:* `nil`) - Required. The request query.
  *   `outputConfig` (*type:* `GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisOutputConfig.t`, *default:* `nil`) - Required. Output configuration indicating where the results will be output to.
  *   `savedAnalysisQuery` (*type:* `String.t`, *default:* `nil`) - Optional. The name of a saved query, which must be in the format of: * projects/project_number/savedQueries/saved_query_id * folders/folder_number/savedQueries/saved_query_id * organizations/organization_number/savedQueries/saved_query_id If both `analysis_query` and `saved_analysis_query` are provided, they will be merged together with the `saved_analysis_query` as base and the `analysis_query` as overrides. For more details of the merge behavior, refer to the [MergeFrom](https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.message#Message.MergeFrom.details) doc. Note that you cannot override primitive fields with default value, such as 0 or empty string, etc., because we use proto3, which doesn't support field presence yet.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :analysisQuery => GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery.t() | nil,
          :outputConfig => GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisOutputConfig.t() | nil,
          :savedAnalysisQuery => String.t() | nil
        }

  field(:analysisQuery, as: GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisQuery)
  field(:outputConfig, as: GoogleApi.CloudAsset.V1.Model.IamPolicyAnalysisOutputConfig)
  field(:savedAnalysisQuery)
end

defimpl Poison.Decoder, for: GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyLongrunningRequest do
  def decode(value, options) do
    GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyLongrunningRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudAsset.V1.Model.AnalyzeIamPolicyLongrunningRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
